﻿#ifndef CHEF_H
#define CHEF_H

#include <QObject>
#include <httppostrequest.h>

class Chef : public QObject
{
    Q_OBJECT
public:
    explicit Chef(QObject *parent = 0);

signals:
    void get_all_unfinished_signal();
    void done_signal();

public slots:
    void chef_modify_info_finished();
    void get_chef_info_finished();
    void get_all_unfinished_finished();
    void done_finished();

public:
    HttpPostRequest *request = new HttpPostRequest();
    HttpPostRequest *order_item_request = new HttpPostRequest();
    void chef_modify_info(QJsonObject &data);
    void get_chef_info(QString token, int uid);

    void get_all_unfinished();
    void done(int order_item_id);

    int uid;
    int id;
    QString jwt_token;
    QString name;
    QString phone;
    int prefer;
    QString sex;
    QJsonArray food_list;
    QJsonArray order_list;
    QJsonArray unfinished_order_item_list;
};

#endif // CHEF_H
